﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;

namespace Tunnel_Cross_Section.option_frm
{
    public partial class message_frm : Office2007Form
    {
       public  bool yesorno;
        System.Resources.ResourceManager resources = new System.Resources.ResourceManager("Tunnel_Cross_Section.pic", System.Reflection.Assembly.GetExecutingAssembly());
        public  message_frm(string msg,string title,int icon)
        {
            InitializeComponent();
            labelX1.Text = "<font size=\"14\">" + msg + "</font>";
            this.Text = title;
            if (icon == 0)
            {
                buttonX1.Visible = false;
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Bomb15")));  //嘲讽
            }
            else if (icon == 1)
            {
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Bomb12")));  //询问
            }
            else if (icon == 2)
            {
                buttonX1.Visible = false;
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Bomb14")));  //出错了
            }
            else if (icon == 3)
            {
                buttonX1.Visible = false;
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Bomb18")));  //依旧出错了
            }

        }
        public message_frm(string msg, string title, int icon, ref bool yes)
        {
            InitializeComponent();
            labelX1.Text = msg;
            this.Text = title;
            if (icon == 0)
            {
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("hamR_n_sickL")));
            }
            else if (icon == 1)
            {
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("star")));
            }
        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            yesorno = true;
            this.Hide();
        }

        private void buttonX1_Click_1(object sender, EventArgs e)
        {
            yesorno = false;
            this.Hide();
        }
    }
}
